UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'i+E5Y7dtH4TKLedUBKcKT2mpigmnhwML9Hi69pR2Q1o='
WHERE
key_id = 'f4a6fcda20e53de7cd3fc23e6dc88d7f1c6493cb88ae5923e59f18e21af4aaa5'
AND (
token = 'i+E5Y7dtH4TKLedUBKcKT2mpigmnhwML9Hi69pR2Q1o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)