UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'DBVy+oG0RevG9GvAKq/dwh0APC263gQJGnuOpr4PjK8='
WHERE
key_id = '200294abbc61610f46c30a15c85d72e9328972124d8de873dea9cea952e5b63d'
AND (
token = 'DBVy+oG0RevG9GvAKq/dwh0APC263gQJGnuOpr4PjK8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)