UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'SDRlHe3o4i+822QtalZhY00300gp7HpRsdhacWAWTy8='
WHERE
key_id = '8973601be3f0c1a9032fa6ed44c4f353a17ac1527c950eb414791c1ed5383480'
AND (
token = 'SDRlHe3o4i+822QtalZhY00300gp7HpRsdhacWAWTy8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)