UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'bcUD0W53peY/T30thREemrDgSQtCdgKdxjzDFNcM33Q='
WHERE
key_id = '553848ccdbbbe928d0e52bb2b2d7bfda37703c039dff47d685767dd24438aa2d'
AND (
token = 'bcUD0W53peY/T30thREemrDgSQtCdgKdxjzDFNcM33Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)