UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'PM75z2ZfJoQ5CSiPFW0omuZ9CV2TIQB5nmqURWiuHJE='
WHERE
key_id = 'a0449be8f45e31d3056b71ac731e1da2b90b94ed88b0f549daca47d307ca25d9'
AND (
token = 'PM75z2ZfJoQ5CSiPFW0omuZ9CV2TIQB5nmqURWiuHJE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)