UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'eDdvGBvKQcbCbsP2yUa0tIVQqr9O5Uy5NEJhi4wX2LU='
WHERE
key_id = '0447c58cfc23202e8aa022f02cbf515f420c2910a1abbc8b4d2b1942e982c954'
AND (
token = 'eDdvGBvKQcbCbsP2yUa0tIVQqr9O5Uy5NEJhi4wX2LU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)