UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'roS+MV8graio1Csgnm161XQAZS1WIOnfpl9EpVnv/XE='
WHERE
key_id = '525fe8d296cad45b4aa503d0095ad74d350de42a6f05a08a1870459bf609a241'
AND (
token = 'roS+MV8graio1Csgnm161XQAZS1WIOnfpl9EpVnv/XE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)