UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'izCLskfazyv/D0Mim6GjBqFyrwV9tVqVJrKnCBR70Fk='
WHERE
key_id = '27b25c7fc3b8418959ce0ea02ebe96ae9b8e8b8095a3fb9c61752a4fbf436007'
AND (
token = 'izCLskfazyv/D0Mim6GjBqFyrwV9tVqVJrKnCBR70Fk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)