UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '293djKDPclFsTP+Pv6lKEjtMpSz5NcXHVGkLH61yNvo='
WHERE
key_id = '70dede669577565e2351ccf77a41ee69ace69e29dbb0014e24405dddf509caa6'
AND (
token = '293djKDPclFsTP+Pv6lKEjtMpSz5NcXHVGkLH61yNvo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)