UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'u9L3l0vOVyyiCGJA/qT00LcrUu3+B0QqGDQP76iixaI='
WHERE
key_id = 'e696fd71b738c51925ca4e7d4e223b66d2d91120705153e37a39800899430960'
AND (
token = 'u9L3l0vOVyyiCGJA/qT00LcrUu3+B0QqGDQP76iixaI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)